﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Data;

namespace MySanArt
{
    public partial class AdresGuncelle : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            bindSehirData();
            bindSehirFaturaData();
            dvFaturaAdres.Visible = false;
        }
        private void bindSehirData()
        {
            ddlCity.DataSource = Collections.GetSehirList();
            ddlCity.DataBind();
        }

        private void bindSehirFaturaData()
        {
            ddlSehirFatura.DataSource = Collections.GetSehirList();
            ddlSehirFatura.DataBind();
        }
        protected void chkAdresAyni_CheckedChanged(object sender, EventArgs e)
        {
            txtAdresFatura.Text = txtAdres.Text;
            txtIlceFatura.Text = txtIlce.Text;
            txtPostaKoduFatura.Text = txtPostaKodu.Text;
            ddlSehirFatura.SelectedItem.Value = ddlCity.SelectedItem.Value;
        }

        protected void lbtnFaturaEkle_Click(object sender, EventArgs e)
        {
            dvFaturaAdres.Visible = true;
        }
    }
}